/*
 * @Author: 飞越疯人院 353362604@qq.com
 * @Date: 2022-10-09 17:30:00
 * @LastEditors: 飞越疯人院 353362604@qq.com
 * @LastEditTime: 2022-11-09 15:41:49
 * @FilePath: \adminstration\src\Common\Login\LoginStyle\StoneLoginPage.jsx
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import '../Scss/LongDuLoginPage.scss'
import { lazy, Suspense, useState } from 'react'
import { commonUrl } from '../../Configure/CommonParameter'
import { v4 as uuidv4 } from 'uuid'

const SignUp = lazy(() => import('../SignUp'))
const CodeUp = lazy(() => import('../CodeUp'))

const LongDuLoginPage = ({ imageUrl, codeState, toggle, uuid, title }) => {
    console.log(title)
    const [QRUuid] = useState(uuidv4())
    return (
        <Suspense fallback={<div>石料厂登录</div>}>
            <div className="LongDuLoginPage">
                <img className="LoginBack" src={`${imageUrl}背景.png`} alt="" />
                <div className="top">
                    <img src={`${imageUrl}顶部导航.png`} alt="" />
                    <div>{title}</div>
                </div>
                <img className="bottom" src={`${imageUrl}低栏.png`} alt="" />

                <div className="LoginBox">
                    <img className="LoginBoxBack" src={`${imageUrl}背景框.png`} alt="" />
                    <div className="LoginBoxTitle">
                        <img src={`${imageUrl}标题北背景.png`} alt="" />
                        <div>平台登录</div>
                    </div>

                    <div className="SingUp">
                        {codeState ? (
                            <CodeUp
                                codeState={codeState}
                                codeStyle={commonUrl + 'code.css'}
                                QRUuid={QRUuid}
                                ProjectUuid={uuid}
                            />
                        ) : (
                            <SignUp />
                        )}
                        {/* <div className='or'>or</div>
                        {codeState ?
                            <div className='tabs' onClick={toggle} >帐号密码登录</div> :
                            <div className='tabs' onClick={toggle} >二维码登录</div>
                        } */}
                    </div>
                </div>
            </div>
        </Suspense>
    )
}
export default LongDuLoginPage
